package com.example.net.http


import com.example.net.http.response.BaseLoginResponse
import com.example.net.http.response.BaseResponse
import com.example.net.http.response.LoginResponse
import com.example.net.http.response.VisitationResponse
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * Author by lp,on 2020/8/31/031,13:48.
 */
interface LoginService {

    //发送短信
    @POST("/enterprise/app-api/member/auth/send-sms-code")
    suspend fun sendSms(@Body requestBody: RequestBody): BaseLoginResponse<Any>
    //发送短信
    @FormUrlEncoded
    @POST("/enterprise/app-api/member/auth/refresh-token")
    suspend fun refreshToken(@Field("refreshToken")refreshToken:String): BaseLoginResponse<LoginResponse>

    //注册并登录
    @POST("/enterprise/app-api/member/auth/sms-login")
    suspend fun registerLogin(@Body requestBody: RequestBody): BaseLoginResponse<LoginResponse>
    //更新个人信息
    @POST("/enterprise/app-api/member/user/update-avatar-url")
    suspend fun updateAvatar(@Body requestBody: RequestBody): BaseLoginResponse<String>

    @POST("/enterprise/fitness/genToken")
    suspend fun getRtcToken(@Body requestBody: RequestBody): BaseResponse<String>
    //校验邀请码
    @POST("/enterprise/app-api/racing/validRacingCode/{code}")
    suspend fun visitation(@Path("code") code: String): BaseLoginResponse<VisitationResponse>


}